#include "GMCreatePlayer.h"
#include "Factory.h"
#include "Timer.h"

#include <iostream>

GMCreatePlayer::GMCreatePlayer()
{
	m_id = 0;
}

GMCreatePlayer::GMCreatePlayer(int id)
{
	m_id = id;
}

void GMCreatePlayer::Execute()
{
}

bool GMCreatePlayer::Read(SocketMessage* sm)
{
	// client recieves
	int tempTS = 0;
	sm->ReadInt(&tempTS);
	m_timeStamp = (unsigned int)tempTS;

	return true;
}

void GMCreatePlayer::Write(SocketMessage* sm)
{
	// server sends to client
	sm->WriteString("GMCreatePlayer");
	m_timeStamp = TheTimer::Instance()->GetTimeMS();
	sm->WriteInt(m_timeStamp);
}